<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Admin_model extends CI_Model {

    public function __construct()
    {
        parent::__construct();
    }

    public function get_admin_by_name($username)
    {
        $query = $this->db->get_where(
            'admin',
            array(
                'username' => $username
            )
        );

        if ($query->num_rows() > 0) {
            return $query->row_array();
        }
        else {
            return FALSE;
        }
    }
}
